package org.midy.infrastructure.tools;

import java.text.DateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class LocalDateFormatTool {
    public static final String DATE_PATTERN_1 = "yyyy-MM-dd HH:mm:ss.SSS";

    public static final String DATE_PATTERN_2 = "yyyyMMddHHmmss";

    public static final String DATE_PATTERN_3 = "yyyy-MM-dd";

    public static final String DATE_PATTERN_4 = "HH:mm:ss";

    public static final String DATE_PATTERN_5 = "yyyy-MM-dd HH:mm:ss";

    public static final DateTimeFormatter DATE_FORMAT_1 = DateTimeFormatter.ofPattern(DATE_PATTERN_1);

    public static final DateTimeFormatter DATE_FORMAT_2 = DateTimeFormatter.ofPattern(DATE_PATTERN_2);

    public static final DateTimeFormatter DATE_FORMAT_3 = DateTimeFormatter.ofPattern(DATE_PATTERN_3);

    public static final DateTimeFormatter DATE_FORMAT_4 = DateTimeFormatter.ofPattern(DATE_PATTERN_4);

    public static final DateTimeFormatter DATE_FORMAT_5 = DateTimeFormatter.ofPattern(DATE_PATTERN_5);
    public static String getNowDateTimeString1(){
        return LocalDateFormatTool.DATE_FORMAT_1.format(LocalDateTime.now());
    }

    public static String getNowDateTimeString5(){
        return LocalDateFormatTool.DATE_FORMAT_5.format(LocalDateTime.now());
    }
}
